Performant, portable, structured concurrency operations for async Rust. It works with any runtime, does not erase lifetimes, always handles cancellation, and always returns output to the caller.
futures-concurrency
provides concurrency operations for both groups of futures
and streams. Both for bounded and unbounded sets of futures and streams. In both
cases performance should be on par with, if not exceed conventional executor
implementations.
Examples
Await multiple futures of different types
use *;
use future;
let a = ready;
let b = ready;
let c = ready;
assert_eq!;
Concurrently process items in a stream
use *;
let v: = vec!
.into_co_stream
.map
.collect
.await;
assert_eq!;
Access stack data outside the futures' scope
Adapted from std::thread::scope
.
use *;
let mut container = vec!;
let mut num = 0;
let a = async ;
let b = async ;
println!;
let _ = .join.await;
container.push;
assert_eq!;
Installation
Contributing
Want to join us? Check out our "Contributing" guide and take a look at some of these issues: